package com.gap.employeeeducation;

import com.buanalintas.framework.Dictionary;
import com.gap.entities.GapMasterEmployeeEducation;
import com.buanalintas.framework.Field;
import com.buanalintas.framework.Page;

/**
 *
 * Class EmployeeEducation is ...
 *
 * Generated on Wed Jan 07 10:52:06 ICT 2015
 *
 * @version 1.0
 * @author  Mr. Kazao™
 * @since   Bynga 1.0
 *
 */
public class EmployeeEducation extends Page {

    
    private Field employeeEducationId;
    
    private Field employeeEducationName;
    
    private Field employeeEducationUniversity;
    
    private Field employeeEducationYear;
    
    private Field employeeEducationTitleFirst;
    
    private Field employeeEducationTitleLast;
    
    private Field employeeEducationDescription;
    
//    private Field employeeEducationTimestamp;
//    
//    private Field employeeEducationEmployeeId;
    

    public EmployeeEducation() {
        super();

        setTheClass(GapMasterEmployeeEducation.class);
        
        
        
        
        employeeEducationId = new Field();
        employeeEducationId.setName("employeeEducationId");
        employeeEducationId.setCaption("id");
        //employeeEducationId.setInfo("employee education id");
        employeeEducationId.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        employeeEducationId.setInputProperties(" size=\"20\"");        
        getFields().add(employeeEducationId);
        
        employeeEducationName = new Field();
        employeeEducationName.setName("employeeEducationName");
        employeeEducationName.setCaption("name");
        employeeEducationName.setRequired(true);
        employeeEducationName.setListProperties(" align=\"left\" width=\"30%\" nowrap");
        employeeEducationName.setInputProperties(" size=\"20\"");        
        getFields().add(employeeEducationName);
        
        employeeEducationUniversity = new Field();
        employeeEducationUniversity.setName("employeeEducationUniversity");
        employeeEducationUniversity.setCaption("university");
        //employeeEducationUniversity.setInfo("employee education university");
        employeeEducationUniversity.setListProperties(" align=\"left\" width=\"30%\" nowrap");
        employeeEducationUniversity.setInputProperties(" size=\"20\"");        
        getFields().add(employeeEducationUniversity);
        
        employeeEducationYear = new Field();
        employeeEducationYear.setName("employeeEducationYear");
        employeeEducationYear.setCaption("year");
        //employeeEducationYear.setInfo("employee education year");
        employeeEducationYear.setListProperties(" align=\"left\" width=\"5%\" nowrap");
        employeeEducationYear.setInputProperties(" size=\"20\"");        
        getFields().add(employeeEducationYear);
        
        employeeEducationTitleFirst = new Field();
        employeeEducationTitleFirst.setName("employeeEducationTitleFirst");
        employeeEducationTitleFirst.setCaption("title first");
        employeeEducationTitleFirst.setDefaultValue(" ");
        //employeeEducationTitleFirst.setInfo("employee education title first");
        employeeEducationTitleFirst.setListProperties(" align=\"left\" width=\"10%\" nowrap");
        employeeEducationTitleFirst.setInputProperties(" size=\"10\"");        
        getFields().add(employeeEducationTitleFirst);
        
        employeeEducationTitleLast = new Field();
        employeeEducationTitleLast.setName("employeeEducationTitleLast");
        employeeEducationTitleLast.setCaption("title last");
        //employeeEducationTitleLast.setInfo("employee education title last");
        employeeEducationTitleLast.setDefaultValue(" ");
        employeeEducationTitleLast.setListProperties(" align=\"left\" width=\"10%\" nowrap");
        employeeEducationTitleLast.setInputProperties(" size=\"10\"");        
        getFields().add(employeeEducationTitleLast);
        
        employeeEducationDescription = new Field();
        employeeEducationDescription.setName("employeeEducationDescription");
        employeeEducationDescription.setCaption("description");
        //employeeEducationDescription.setInfo("employee education description");
        employeeEducationDescription.setListProperties(" align=\"left\" width=\"40%\" nowrap");
        employeeEducationDescription.setInputProperties(" cols=\"50\" rows=\"5\"");
        employeeEducationDescription.setInputType(Field.INPUT_TEXT_AREA);       
        getFields().add(employeeEducationDescription);
        
//        employeeEducationTimestamp = new Field();
//        employeeEducationTimestamp.setName("employeeEducationTimestamp");
//        employeeEducationTimestamp.setCaption("timestamp");
//        //employeeEducationTimestamp.setInfo("employee education timestamp");
//        employeeEducationTimestamp.setListProperties(" align=\"center\" width=\"1%\" nowrap");
//        employeeEducationTimestamp.setInputProperties(" size=\"12\"");
//        //employeeEducationTimestamp.setFormatter(DateFormatter.getInstanceDateTime(this));
//        getFields().add(employeeEducationTimestamp);
        
//        employeeEducationEmployeeId = new Field();
//        employeeEducationEmployeeId.setName("employeeEducationEmployeeId");
//        employeeEducationEmployeeId.setCaption("employee");
//        //employeeEducationEmployeeId.setInfo("employee education employee id");
//        employeeEducationEmployeeId.setListProperties(" align=\"left\" width=\"1%\" nowrap");
//        employeeEducationEmployeeId.setInputProperties(" size=\"30\"");        
//        getFields().add(employeeEducationEmployeeId);
//        

        fillFields();
        getFieldsAdd().remove(employeeEducationId);
        getFieldsEdit().remove(employeeEducationId);
        getFieldsList().remove(employeeEducationId);
        
        setExportList(getClass().getResourceAsStream("EducationList.jasper"));
        setExport(getClass().getResourceAsStream("Education.jasper"));
    }
      @Override
    public void beforeExport() {
        getExportParams().put("title", Dictionary.getValue(this, "Employee Education"));
    }

    @Override
    public void beforeExportMulti() {
        beforeExport();
    }
}
